package com.example.my.meila.model.impl;

import com.example.my.meila.api.RetroManager;
import com.example.my.meila.entity.Good;
import com.example.my.meila.model.IGoodModel;

import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by My on 2016/10/31.
 */
public class GoodModelImpl implements IGoodModel {
    @Override
    public void getGoodData(Subscriber<Good> subscriber) {
        RetroManager.getInstance()
                .getApiService()
                .getGoodData()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }
}
